package com.example.shiwuyouproject.ui.fragment.my.activity.adapter

import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.shiwuyouproject.R
import com.example.shiwuyouproject.ui.fragment.my.activity.bean.RightWeekBean

/**
 * ls
 * 2021/3/25
 */
class RightWeekAdapter :BaseQuickAdapter<RightWeekBean,BaseViewHolder>(R.layout.item_rightweek){
    override fun convert(helper: BaseViewHolder?, item: RightWeekBean?) {
            val myRecyclerView: RecyclerView? =helper?.getView(R.id.myItemRecyclerView)
            val myAdapter =RightWeekChldAdapter()
                  myRecyclerView?.adapter=myAdapter
        myAdapter.setNewData(item?.menuData)
        myAdapter.setOnItemClickListener { adapter, view, position ->
            myAdapter.data[position].myStatus=!myAdapter.data[position].myStatus
            myAdapter.notifyDataSetChanged()
        }
    }
}